package com.local.videoplayer.bean;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ccx on 17/3/30.
 */

public class VideoBean implements Parcelable {

    public String videoName;
    public long updateTime;
    public String videoImg;
    public String videoPath;
    public String mimeType;
    public long duration;
    public long size;
    public Bitmap bitmap;
    @Override
    public String toString() {
        return "VideoBean{" + "videoName='" + videoName + '\'' + ", updateTime=" + updateTime +
                ", videoImg='" + videoImg + '\'' + ", videoPath='" + videoPath + '\'' +
                ", mimeType='" + mimeType + '\'' + ", duration=" + duration + ", size=" + size +
                '}';
    }

    public VideoBean() {}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.videoName);
        dest.writeLong(this.updateTime);
        dest.writeString(this.videoImg);
        dest.writeString(this.videoPath);
        dest.writeString(this.mimeType);
        dest.writeLong(this.duration);
        dest.writeLong(this.size);
    }

    protected VideoBean(Parcel in) {
        this.videoName = in.readString();
        this.updateTime = in.readLong();
        this.videoImg = in.readString();
        this.videoPath = in.readString();
        this.mimeType = in.readString();
        this.duration = in.readLong();
        this.size = in.readLong();
    }

    public static final Creator<VideoBean> CREATOR = new Creator<VideoBean>() {
        @Override
        public VideoBean createFromParcel(Parcel source) {return new VideoBean(source);}

        @Override
        public VideoBean[] newArray(int size) {return new VideoBean[size];}
    };
}
